<!--
 Copyright (C) 2009-2010 Google Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<html>
  <head>
    <script src="../../third_party/json2.js"></script>
    <script src="../../third_party/ometa/lib.js"></script>
    <script src="../../third_party/ometa/ometa-base.js"></script>
    <script src="../../src/parser/unicode.js"></script>
    <script src="../../src/parser/es5parser.js"></script>
    <script src="parsertests.js"></script>
	  <script src="firebug-profile-tests.js"></script>
   
	<script>
	unit = fireunit;
	/*
	(function() {
	  var origOnload = window.onload;
	  window.onload = function() {
	    origOnLoad.call(window);
        report("starting tests");
        lexerTestSuite();
        document.write("lexer testsuide done");
        parserTestSuite();
        document.write("parser testsuide done");
      };
	})();*/
    </script>
  <title>ES5 Interpreter Parser Tests</title>
  <body>
    <h2>Instructions</h2>
    This file runs the <a href="parsertests.js">unit tests</a> for the
    <a href="../../src/parser/es5parser.ojs">ES5 parser</a>.
    It is meant to be run with the FireUnit extension to Firebug in Firefox.
    The unit tests assume that the OMeta grammar has been generated and is
    available in compiled form in the file
    <a href="../../src/parser/es5parser.js">es5parser.js</a>.
    <p>This page also serves as a convenient playground in combination with
	the FireBug command-line. The parsed can be invoked using <tt>parse(string,rule)</tt>, the lexer using <tt>lex(string,rule)</tt></p>
    <p>To spot syntax errors in the OMeta grammar itself,
    it may be more convenient to debug in the
    <a href="../../third_party/ometa/workspace.html">OMeta workspace</a>, where
    parse errors in the grammar itself are highlighted. Note that the workspace
    evaluates OMeta/JS code, not actual Javascript code. The unit tests for
    the parser are written in Javascript, not OMeta/JS.
  </body>
</html>